Page({
    data: {
        customerInfo: null,
    },
    onLoad(options) {
        this.getServer()
    },
    /**获取客服信息 */
    getServer() {
        this.request({
            url: '/api/index/config?type=1',
            loadingTip: '加载中',
            login: false
        }, res => {
            this.setData({ customerInfo: res.data })
        })
    },
    /**拨打电话 */
    tel() {
        wx.makePhoneCall({
            phoneNumber: this.data.customerInfo.mobile
        })
    },
    /**复制微信号 */
    copy() {
        wx.setClipboardData({
            data: this.data.customerInfo.weixin
        })
    },
})